home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 2 / LSD and 17bit Compendium Deluxe - Volume II.iso / a / prog / asmsrc / mischards.lha / SourceCode / RaveSyndrome2.s < prev   
Text File  |  1980-02-20  |  16KB  |  892 lines

  1. RVS1
  2.     Opt    c-
  3.     Section    "RaveSyndrome2 Code",Code_c
  4.  
  5.     IncDir    Df0:
  6.  
  7. Start    Movem.l    d0-d7/a0-a6,-(sp) 
  8.     Bsr    KillSys          
  9.  
  10.     Lea    OldLevel2(pc),a0
  11.     Lea    Level2Int(pc),a1
  12.     Move.l    $68,(a0)
  13.     Move.l    a1,$68
  14.     Lea    OldLevel3(pc),a0
  15.     Lea    Level3Int(pc),a1
  16.     Move.l    $6c,(a0)
  17.     Move.l    a1,$6c
  18.  
  19.     Bsr    SetCycle
  20.     Lea    CopperList(pc),a0 
  21.     Lea    HardWare,a6      
  22.     Move.l    a0,Cop1Lc(a6)      
  23.     
  24.     Move.w    #$83c0,DMACon(a6)
  25.     Move.l    GridBuffer(pc),a0
  26.     Lea    CopperList(pc),a1
  27.     Bsr    GridSeg+$20
  28.     Move.l    DynaBuffer(pc),a0
  29.     Bsr    DynaShape+$20
  30.     Move.w    #$c028,IntEna(a6)    
  31.     
  32. Loop    Lea    ScreenLoad(pc),a0
  33.     Moveq    #0,d0
  34.     Move.w    (a0),d0
  35.     Cmpi.w    #-1,d0
  36.     Beq    NoPicLoad
  37.     Bsr    LoadPiccy    
  38.     
  39. NoPicLoad    Btst    #6,$Bfe001      
  40.     Bne    Loop      
  41.         
  42.     Lea    VisionMode(pc),a0
  43.     Move.w    #0,(a0)
  44.     Bsr    ExpungeAll
  45.     
  46.     Bsr    SysWait
  47.  
  48.     Lea    VisionMode(pc),a0
  49.     Move.w    #0,(a0)
  50.     Bsr    ExpungeAll
  51.  
  52.     Bsr    ReturnSys      
  53.     Movem.l    (sp)+,d0-d7/a0-a6 
  54.     Moveq    #0,d0      
  55.     Rts
  56.  
  57. LoadPiccy    Lea    MFMBufferPt(pc),a0
  58.     Move.l    (a0),a2
  59.     Lea    FileBufferPt(pc),a0
  60.     Move.l    (a0),a1
  61.     Add.l    d0,d0
  62.     Lea    Fn(pc),a3
  63.     Moveq    #0,d3
  64.     Lea    FileNameList(pc),a4
  65.     Move.w    (a4,d0),d3
  66.     Add.l    d3,a3
  67.     Lea    FileNameBase(pc),a0
  68. GetFileName    Move.b    (a3)+,d0
  69.     Cmpi.b    #-1,d0
  70.     Beq    EndFileName
  71.     Move.b    d0,(a0)+
  72.     Bra    GetFileName
  73.  
  74. EndFileName    Lea    FileNameBase(pc),a0
  75.     Movem.l    d0-d7/a0-a6,-(sp)
  76.     Bsr    FileLoad
  77.     Movem.l    (sp)+,d0-d7/a0-a6
  78.     
  79.     Lea    ScrBufferLock(pc),a2
  80.     Moveq    #0,d1
  81.     Move.w    (a2),d1
  82.     Add.w    #1,d1
  83.     And.w    #3,d1
  84.     Move.w    d1,(a2)
  85.     Lea    ScrBuffer1-4(pc),a3
  86.     Add.l    d1,d1
  87.     Add.l    d1,d1
  88.     Move.l    (a3,d1),a1
  89.     Lea    Screen(pc),a4
  90.     Move.l    a1,(a4)
  91.     
  92.     Lea    FileBufferPt(pc),a0
  93.     Move.l    (a0),a0
  94.     Bsr    DecrunchIFF+$20
  95.     
  96.     Lea    ScreenLoad(pc),a0
  97.     Move.w    #-1,(a0)
  98.     
  99. SetNewPiccy    Move.l    Screen(pc),d0
  100.     Subq    #2,d0
  101.     Lea    CopperBPLS(pc),a0
  102.     Bsr    SetBPLS
  103.     Rts
  104.     
  105. SetBPLS    Move.w    #4,d7
  106. SetBPs    Move.l    d0,d1
  107.     Move.w    d1,6(a0)
  108.     Swap    d1
  109.     Move.w    d1,2(a0)
  110.     Add.l    #$2c00,d0
  111.     Add.l    #8,a0
  112.     Dbf    d7,SetBPs
  113.     Rts
  114.  
  115. ProcessStrobe    Lea    StrobeType(pc),a0
  116.     Move.w    (a0),d0
  117.     Beq    NoStrobe
  118.     Cmpi.w    #1,d0
  119.     Beq    ProcStrobe1
  120.     Cmpi.w    #2,d0
  121.     Beq    ProcStrobe2
  122. NoStrobe    Rts
  123.  
  124. ProcStrobe1    Move.w    2(a0),d0
  125.     Sub.w    #1,d0
  126.     Beq    EndStrobe
  127.     Move.w    d0,2(a0)
  128.     Lea    CopperColsPt(pc),a0
  129.     Move.l    (a0),a0
  130.     Move.w    #31,d7
  131. StrobeColLoop    Move.w    #$fff,(a0)
  132.     Addq    #4,a0
  133.     Dbf    d7,StrobeColLoop
  134.     Rts
  135.  
  136. ProcStrobe2    Move.w    2(a0),d0
  137.     Sub.w    #1,d0
  138.     Beq    EndStrobe
  139.     Move.w    d0,2(a0)
  140.     And.w    #$f,d0
  141.     Move.w    d0,d1
  142.     Asl.w    #4,d0
  143.     Or.w    d1,d0
  144.     Asl.w    #4,d0
  145.     Or.w    d1,d0
  146.     Lea    CopperColsPt(pc),a0
  147.     Move.l    (a0),a0
  148.     Move.w    #31,d7
  149. StrobeColLoop1    Move.w    d0,(a0)
  150.     Addq    #4,a0
  151.     Dbf    d7,StrobeColLoop1
  152.     Rts
  153.     
  154. EndStrobe    Move.l    #0,(a0)
  155.     Rts
  156.  
  157. Level2Int    Movem.l    d0-d7/a0-a6,-(sp)
  158.     Btst    #3,$Bfed01
  159.     Beq    RetExc2
  160.     
  161.     Bsr    GetKey
  162.  
  163. RetExc2    Movem.l    (sp)+,d0-d7/a0-a6    
  164.     Move.w    #$8,$Dff09c
  165.     Rte
  166.  
  167. Level3Int    Movem.l    d0-d7/a0-a6,-(sp)
  168.     Move.w    $Dff01e,d0
  169.     Btst    #5,d0
  170.     Beq    RetExc3
  171.     
  172.     Bsr    ProcessStrobe
  173.     Bsr    Cycle
  174.     Bsr    EnCycle
  175.     Bsr    ProcessVision
  176.             
  177. RetExc3    Movem.l    (sp)+,d0-d7/a0-a6    
  178.     Move.w    #$20,$Dff09c
  179.     Rte
  180.  
  181. GetKey    Move.b    #$50,$Bfee01
  182.     Move.b    #$10,$Bfee01
  183.     Moveq    #0,d0
  184.     Move.b    $Bfec01,d0
  185.     Ror.b    #1,d0
  186.     Not.b    d0
  187.     
  188. GetK    Move.b    d0,d4
  189.     Bclr    #7,d0
  190.     
  191.     Lea    KeyBoardTab(pc),a0
  192. NextSpec    Move.l    (a0)+,d2
  193.     Move.l    (a0)+,d1
  194.     Move.l    (a0)+,a1
  195.     Cmpi.l    #-1,d1
  196.     Beq    EndSpecTab
  197.     Cmp.b    d0,d1
  198.     Beq    FoundSpec
  199.     Bra    NextSpec
  200.     
  201. FoundSpec    Lea    KeyUpTest(pc),a2
  202.     Move.w    d4,(a2)
  203.     
  204.     Cmpi.b    #1,d2
  205.     Beq    NoTstB
  206.         
  207.     Btst    #7,d4
  208.     Bne    EndSpecTab
  209. NoTstB    Lea    Pc(pc),a0
  210.     Add.l    a0,a1
  211.     Jmp    (a1)
  212. EndSpecTab    Rts
  213.  
  214. KillSys    Bsr.s    SysWait    
  215.  
  216.     Move.l    $4,a6    
  217.     Lea    GFXName(pc),a1    
  218.     Moveq    #0,d0    
  219.     Jsr    -552(a6)    
  220.         
  221.     Lea    OldCop1(pc),a5
  222.     Move.l    $26(a0),$0(a5)    
  223.     Move.l    $32(a0),$4(a5)    
  224.     
  225.     Lea    HardWare,a6
  226.     Move.w    IntEnaR(a6),d0    
  227.     Move.w    DMAConR(a6),d1  
  228.     Or.w    #$8000,d0    
  229.     And.w    #$03ff,d1    
  230.     Or.w    #$8000,d1    
  231.     Move.w    d0,$8(a5)    
  232.     Move.w    d1,$a(a5)    
  233.     
  234.     Move.w    #$7fff,IntEna(a6) 
  235.     Move.w    #$7fff,DMACon(a6) 
  236.     Rts
  237.  
  238. SysWait    Move.w    #15,d7    
  239. SysWaitLoop    Move.l    #$05000,d1    
  240.     Bsr.s    WaitVBL    
  241.     Bsr.s    DoWaitVBL    
  242.     Dbf    d7,SysWaitLoop    
  243.     Rts
  244.  
  245. DoWaitVBL    Move.l    #$03000,d1    
  246. WaitVBL    Movem.l    d0-d1/a6,-(sp)    
  247.     Lea    HardWare,a6    
  248. WaitVBLLoop    Move.l    VPosR(a6),d0    
  249.     And.l    #$1ff00,d0    
  250.     Cmp.l    d1,d0    
  251.     Bne.s    WaitVBLLoop    
  252.     Movem.l    (sp)+,d0-d1/a6    
  253.     Rts        
  254.  
  255. ReturnSys    Lea    HardWare,a6    
  256.     Move.w    #$7fff,IntEna(a6)
  257.     Move.w    #$7fff,DMACon(a6)
  258.     Move.w    OldIntEna(pc),IntEna(a6)
  259.     Move.w    OldDMACon(pc),DMACon(a6)
  260.     Move.l    OldCop1(pc),Cop1lc(a6)
  261.     Move.l    OldCop2(pc),Cop2lc(a6)
  262.     Move.l    OldLevel2(pc),$68
  263.     Move.l    OldLevel3(pc),$6c
  264.     Rts
  265.     
  266. SetCycle    Lea    CycleList1(pc),a0
  267.     Lea    CycleStart(pc),a1
  268.     Lea    CopperColsPt(pc),a2
  269.     Lea    CopperCols+2(pc),a3
  270.     Lea    CyclePos(pc),a4
  271.     Move.l    a0,(a1)
  272.     Move.l    a3,(a2)
  273.     Move.l    #0,(a4)
  274.     Lea    CycleList1(pc),a0
  275.     Lea    EnCycleStart(pc),a1
  276.     Lea    EnCyclePos(pc),a4
  277.     Move.l    a0,(a1)
  278.     Move.l    #0,(a4)
  279.  
  280. Cycle    Move.w    StrobeType(pc),d0
  281.     Bne    NoCycle
  282.     Move.l    CopperColsPt(pc),a0
  283. DoCycle    Move.l    CycleStart(pc),a1
  284.     Moveq    #0,d0
  285.     Lea    CyclePos(pc),a5
  286.     Move.w    (a5),d0
  287.     Add.w    #1,(a5)
  288.     Asl.w    #1,d0
  289.     
  290.     Add.l    d0,a1
  291.     Move.w    (a1)+,d0
  292.     Cmpi.w    #$ffff,d0
  293.     Bne    NotTabEnd
  294.     Move.l    #0,(a5)
  295.     Bra    DoCycle
  296.     
  297. NotTabEnd    Move.w    #31,d7
  298. DoColoCyc    Move.w    d0,(a0)
  299.     Add.l    #4,a0
  300. RedooC    Move.w    (a1)+,d0
  301.     Cmpi.w    #$ffff,d0
  302.     Bne    NotColoL
  303.     Move.l    CycleStart(pc),a1
  304.     Bra    RedooC
  305. NotColoL    Dbf    d7,DoColoCyc    
  306. NoCycle    Rts
  307.  
  308. EnCycle    Move.w    FifthColMode(pc),d0
  309.     Cmpi.w    #0,d0
  310.     Beq    EnNoCycle
  311.     Move.l    CopperColsPt(pc),a0
  312.     Add.l    #(16*4),a0
  313. EnDoCycle    Move.l    EnCycleStart(pc),a1
  314.     Moveq    #0,d0
  315.     Lea    EnCyclePos(pc),a5
  316.     Move.w    (a5),d0
  317.     Add.w    #1,(a5)
  318.     Asl.w    #1,d0
  319.     
  320.     Add.l    d0,a1
  321.     Move.w    (a1)+,d0
  322.     Cmpi.w    #$ffff,d0
  323.     Bne    EnNotTabEnd
  324.     Move.l    #0,(a5)
  325.     Bra    EnDoCycle
  326.     
  327. EnNotTabEnd    Move.w    #15,d7
  328. EnDoColoCyc    Move.w    d0,(a0)
  329.     Add.l    #4,a0
  330. EnRedooC    Move.w    (a1)+,d0
  331.     Cmpi.w    #$ffff,d0
  332.     Bne    EnNotColoL
  333.     Move.l    EnCycleStart(pc),a1
  334.     Bra    EnRedooC
  335. EnNotColoL    Dbf    d7,EnDoColoCyc    
  336. EnNoCycle    Rts
  337.  
  338. ProcessVision    Lea    VisionMode(pc),a0    
  339.     Cmpi.w    #0,(a0)
  340.     Beq    NoVision
  341.     Cmpi.w    #1,(a0)
  342.     Beq    CallGridVBL
  343.     Cmpi.w    #2,(a0)
  344.     Beq    CallGridVBL1
  345.     Cmpi.w    #3,(a0)
  346.     Beq    CallDynaVBL
  347. NoVision    Bra    ExpungeAll
  348.  
  349. CallGridVBL    Move.w    #1,d0
  350.     Lea    CopperCols(pc),a0
  351.     Bra    GridSeg+$22
  352.  
  353. CallGridVBL1    Move.w    #0,d0
  354.     Lea    CopperCols(pc),a0
  355.     Bra    GridSeg+$22
  356.  
  357. CallDynaVBL    Lea    FifthColMode(pc),a0
  358.     Cmpi.w    #0,0(a0)
  359.     Beq    NoFifthCol
  360.     Cmpi.w    #2,0(a0)
  361.     Beq    SwipeCols
  362. NoFifthCol    Bra    DynaShape+$24
  363.  
  364. SwipeCols    Lea    CopperCols+(16*4)+2(pc),a0
  365.     Move.w    (a0),d0
  366.     Moveq    #15,d7
  367. SwipeLoop    Move.w    d0,(a0)
  368.     Addq    #4,a0
  369.     Dbf    d7,SwipeLoop
  370.     Bra    NoFifthCol
  371.     
  372. SLoad    Macro
  373.     Moveq    #\1,d0
  374.     Bra    SetLoadPic
  375.     EndM
  376.     
  377. SCyc    Macro
  378.     Moveq    #\1,d0
  379.     Bra    SetNewCycle
  380.     EndM
  381.     
  382. Pc
  383. SLPic0    SLoad    0
  384. SLPic1    SLoad    1
  385. SLPic2    SLoad    2
  386. SLPic3    SLoad    3
  387. SLPic4    SLoad    4
  388. SLPic5    SLoad    5
  389. SLPic6    SLoad    6
  390. SLPic7    SLoad    7
  391. SLPic8    SLoad    8
  392. SLPic9    SLoad    9
  393. SLPic10    SLoad    10
  394. SLPic11    SLoad    11
  395. SLPic12    SLoad    12
  396. SLPic13    SLoad    13
  397. SLPic14    SLoad    14
  398. SLPic15    SLoad    15
  399.  
  400. DoCyc1    SCyc    0
  401. DoCyc2    SCyc    1
  402. DoCyc3    SCyc    2
  403. DoCyc4    SCyc    3
  404. DoCyc5    SCyc    4
  405. DoCyc6    SCyc    5
  406. DoCyc7    SCyc    6
  407. DoCyc8    SCyc    7
  408. DoCyc9    SCyc    8
  409. DoCyc10    SCyc    9
  410. DoCyc11    SCyc    10
  411. DoCyc12    SCyc    11
  412. DoCyc13    SCyc    12
  413. DoCyc14    SCyc    13
  414. DoCyc15    SCyc    14
  415. DoCyc16    SCyc    15
  416.  
  417. DoEnCyc    Lea    KeyUpTest(pc),a0
  418.     Lea    EnCyc2(pc),a1
  419.     Move.w    (a0),d0
  420.     Btst    #7,d0
  421.     Beq    SettingEnUp
  422.     
  423.     Move.w    #0,(a1)
  424.     Rts
  425. SettingEnUp    Move.w    #-1,(a1)
  426.     Rts
  427.  
  428. SetBuff1    Lea    ScrBuffer0(pc),a0
  429.     Bra    SetNewBuffer
  430. SetBuff2    Lea    ScrBuffer1(pc),a0
  431.     Bra    SetNewBuffer
  432. SetBuff3    Lea    ScrBuffer2(pc),a0
  433.     Bra    SetNewBuffer
  434. SetBuff4    Lea    ScrBuffer3(pc),a0
  435.     Bra    SetNewBuffer
  436.     
  437. SetNewBuffer    Lea    Screen(pc),a1
  438.     Move.l    (a0),(a1)
  439.     Bra    SetNewPiccy
  440.  
  441. SetLoadPic    Lea    ScreenLoad(pc),a0
  442.     Move.w    d0,(a0)
  443.     Rts
  444.  
  445. SetNewCycle    Lea    CycleTab(pc),a0
  446.     Lea    Cyc(pc),a1
  447.     Lea    EnCyc2(pc),a2
  448.     Moveq    #0,d1
  449.     Move.w    d0,d1
  450.     Add.l    d1,d1
  451.     Move.w    (a0,d1.l),d1
  452.     Add.l    d1,a1
  453.     Cmp.w    #0,(a2)
  454.     Beq    SetNormCyc
  455.     Lea    EnCyclePos(pc),a0
  456.     Move.l    #0,0(a0)
  457.     Move.l    a1,4(a0)
  458.     Rts
  459. SetNormCyc    Lea    CyclePos(pc),a0
  460.     Move.l    #0,0(a0)
  461.     Move.l    a1,4(a0)
  462.     Rts
  463.     
  464. DoStrobe1    Lea    StrobeType(pc),a0
  465.     Move.w    #1,0(a0)
  466.     Move.w    #5,2(a0)
  467.     Rts
  468.  
  469. DoStrobe2    Lea    StrobeType(pc),a0
  470.     Move.w    #2,0(a0)
  471.     Move.w    #16,2(a0)
  472.     Rts
  473.  
  474. SetGridder    Lea    VisionMode(pc),a0
  475.     Move.w    #1,(a0)
  476.     Lea    FifthColMode(pc),a0
  477.     Move.w    #0,(a0)
  478.     Rts
  479. SetGridder1    Lea    VisionMode(pc),a0
  480.     Move.w    #2,(a0)
  481.     Lea    FifthColMode(pc),a0
  482.     Move.w    #0,(a0)
  483.     Rts
  484.     
  485. SetDynaShape1    Lea    FifthColMode(pc),a0
  486.     Move.w    #0,(a0)
  487.     Bra    SetDynaShape
  488. SetDynaShape2    Lea    FifthColMode(pc),a0
  489.     Move.w    #1,(a0)
  490.     Bra    SetDynaShape
  491. SetDynaShape3    Lea    FifthColMode(pc),a0
  492.     Move.w    #2,(a0)
  493.     
  494. SetDynaShape    Lea    VisionMode(pc),a0
  495.     Move.w    #3,(a0)
  496.     Bsr    ExpungeAll
  497.     Lea    CopperBPLS+(4*8)(pc),a0
  498.     Bsr    DynaShape+$22
  499.     Rts
  500.  
  501. SetMode0    Lea    VisionMode(pc),a0
  502.     Move.w    #0,(a0)
  503.     Lea    FifthColMode(pc),a0
  504.     Move.w    #0,(a0)
  505.     Bsr    SetNewPiccy
  506.     Bra    ExpungeAll
  507.  
  508. ExpungeAll    Bra    GridSeg+$24
  509.  
  510. GFXName    Dc.b    "graphics.library",0
  511.     Even
  512. OldCop1    Dc.l    0    
  513. OldCop2    Dc.l    0    
  514. OldIntEna    Dc.w    0    
  515. OldDmaCon    Dc.w    0    
  516. OldLevel2    Dc.l    0
  517. OldLevel3    Dc.l    0
  518. KeyUpTest    Dc.w    0
  519. Screen    Dc.l    $70000
  520. ScreenLoad    Dc.w    -1
  521. ScrBufferLock    Dc.w    1
  522. ScrBuffer0    Dc.l    $72300
  523. ScrBuffer1    Dc.l    $64700
  524. ScrBuffer2    Dc.l    $56b00
  525. ScrBuffer3    Dc.l    $48f00
  526. MFMBufferPt    Dc.l    $3e800
  527. FileBufferPt    Dc.l    $2e800
  528. FileNamePt    Dc.l    0
  529. GridBuffer    Dc.l    $52480
  530. DynaBuffer    Dc.l    $70000
  531. CyclePos    Dc.l    0
  532. CycleStart    Dc.l    0
  533. EnCyclePos    Dc.l    0
  534. EnCycleStart    Dc.l    0
  535. CopperColsPt    Dc.l    0
  536. StrobeType    Dc.w    0
  537. StrobeCount    Dc.w    0
  538. VisionMode    Dc.w    0
  539. GridOnLast    Dc.w    0
  540. FifthColMode    Dc.w    0
  541. FifthColour    Dc.w    $fff
  542. EnCyc2    Dc.w    0
  543.  
  544. FileNameBase    Dc.l    0,0,0,0,0,0,0,0,0,0,0,0
  545.  
  546. Fn
  547. FileName1    Dc.b    "Df1:Cyc1.IFF",0,-1
  548. FileName2    Dc.b    "Df1:Cyc2.IFF",0,-1
  549. FileName3    Dc.b    "Df1:Cyc3.IFF",0,-1
  550. FileName4    Dc.b    "Df1:Cyc4.IFF",0,-1
  551. FileName5    Dc.b    "Df1:Cyc5.IFF",0,-1
  552. FileName6    Dc.b    "Df1:Cyc6.IFF",0,-1
  553. FileName7    Dc.b    "Df1:Cyc7.IFF",0,-1
  554. FileName8    Dc.b    "Df1:Cyc8.IFF",0,-1
  555. FileName9    Dc.b    "Df1:Cyc9.IFF",0,-1
  556. FileName10    Dc.b    "Df1:Cyc10.IFF",0,-1
  557. FileName11    Dc.b    "Df1:Cyc11.IFF",0,-1
  558. FileName12    Dc.b    "Df1:Cyc12.IFF",0,-1
  559. FileName13    Dc.b    "Df1:Cyc13.IFF",0,-1
  560. FileName14    Dc.b    "Df1:Cyc14.IFF",0,-1
  561. FileName15    Dc.b    "Df1:Cyc15.IFF",0,-1
  562. FileName16    Dc.b    "Df1:Cyc16.IFF",0,-1
  563.     Even
  564.  
  565. FileNameList    Dc.w    FileName1-Fn,FileName2-Fn,FileName3-Fn,FileName4-Fn
  566.     Dc.w    FileName5-Fn,FileName6-Fn,FileName7-Fn,FileName8-Fn
  567.     Dc.w    FileName9-Fn,FileName10-Fn,FileName11-Fn,FileName12-Fn
  568.     Dc.w    FileName13-Fn,FileName14-Fn,FileName15-Fn,FileName16-Fn
  569.     Dc.w    -1,-1
  570.  
  571. KeyBoardTab    Dc.l    0,$31,SLPic0-Pc,0,$32,SLPic1-Pc
  572.     Dc.l    0,$33,SLPic2-Pc,0,$34,SLPic3-Pc
  573.     Dc.l    0,$35,SLPic4-Pc,0,$36,SLPic5-Pc
  574.     Dc.l    0,$37,SLPic6-Pc,0,$38,SLPic7-Pc
  575.     Dc.l    0,$39,SLPic8-Pc,0,$3a,SLPic9-Pc
  576.     Dc.l    0,$20,SLPic10-Pc,0,$21,SLPic11-Pc
  577.     Dc.l    0,$22,SLPic12-Pc,0,$23,SLPic13-Pc
  578.     Dc.l    0,$24,SLPic14-Pc,0,$25,SLPic15-Pc
  579.     Dc.l    0,$5a,DoCyc1-Pc,0,$5b,DoCyc2-Pc
  580.     Dc.l    0,$5c,DoCyc3-Pc,0,$5d,DoCyc4-Pc
  581.     Dc.l    0,$3d,DoCyc5-Pc,0,$3e,DoCyc6-Pc
  582.     Dc.l    0,$3f,DoCyc7-Pc,0,$4a,DoCyc8-Pc
  583.     Dc.l    0,$2d,DoCyc9-Pc,0,$2e,DoCyc10-Pc
  584.     Dc.l    0,$2f,DoCyc11-Pc,0,$5e,DoCyc12-Pc
  585.     Dc.l    0,$1d,DoCyc13-Pc,0,$1e,DoCyc14-Pc
  586.     Dc.l    0,$1f,DoCyc15-Pc,0,$43,DoCyc16-Pc
  587.     Dc.l    0,$4f,SetBuff1-Pc,0,$4c,SetBuff2-Pc
  588.     Dc.l    0,$4d,SetBuff3-Pc,0,$4e,SetBuff4-Pc
  589.     Dc.l    0,$46,DoStrobe1-Pc,0,$5f,DoStrobe2-Pc
  590.     Dc.l    0,$50,SetGridder-Pc,0,$45,SetMode0-Pc
  591.     Dc.l    0,$51,SetGridder1-Pc
  592.     Dc.l    0,$52,SetDynaShape1-Pc,0,$53,SetDynaShape2-Pc,0,$54,SetDynaShape3-Pc
  593.     Dc.l    1,$3c,DoEnCyc-Pc
  594.     Dc.l    -1,-1
  595.     
  596. CycleTab    
  597.     Dc.w    CycleList1-Cyc,CycleList2-Cyc
  598.     Dc.w    CycleList3-Cyc,CycleList4-Cyc
  599.     Dc.w    CycleList5-Cyc,CycleList6-Cyc
  600.     Dc.w    CycleList7-Cyc,CycleList8-Cyc
  601.     Dc.w    CycleList9-Cyc,CycleList10-Cyc
  602.     Dc.w    CycleList11-Cyc,CycleList12-Cyc
  603.     Dc.w    CycleList13-Cyc,CycleList14-Cyc
  604.     Dc.w    CycleList15-Cyc,CycleList16-Cyc
  605.     Dc.w    -1,-1
  606.  
  607. Cyc
  608. CycleList1    Dc.w    0,0,0,0,0,0,0,0
  609.     Dc.w    $fff,$fff,$fff,$fff,$fff,$fff,$fff,$fff
  610.     Dc.w    0,0,0,0,0,0,0,0
  611.     Dc.w    $fff,$fff,$fff,$fff,$fff,$fff,$fff,$fff
  612.     Dc.w    -1
  613.  
  614. CycleList2    Dc.w    0,0,0,0,0,0,0,0
  615.     Dc.w    0,0,0,0,0,0,0,0
  616.     Dc.w    $fff,$fff,$fff,$fff,$fff,$fff,$fff,$fff
  617.     Dc.w    $fff,$fff,$fff,$fff,$fff,$fff,$fff,$fff
  618.     Dc.w    -1
  619.  
  620. CycleList3    Dc.w    0,0,0,0,0,0,0,0
  621.     Dc.w    0,0,0,0,0,0,0,0
  622.     Dc.w    0,0,0,0,0,0,0,0
  623.     Dc.w    0,0,0,0,0,0,0,$fff
  624.     Dc.w    -1
  625.  
  626. CycleList4    Dc.w    0,0,0,0,0,0,0,0
  627.     Dc.w    0,0,0,0,0,0,0,0
  628.     Dc.w    0,0,0,0,0,0,0,0
  629.     Dc.w    0,0,0,0,$fff,$fff,$fff,$fff
  630.     Dc.w    -1
  631.  
  632. CycleList5    Dc.w    $000,$111,$222,$333,$444,$555,$666,$777
  633.     Dc.w    $888,$999,$aaa,$bbb,$ccc,$ddd,$eee,$fff
  634.     Dc.w    $fff,$eee,$ddd,$ccc,$bbb,$aaa,$999,$888
  635.     Dc.w    $777,$666,$555,$444,$333,$222,$111,$000
  636.     Dc.w    -1
  637.  
  638. CycleList6    Dc.w    $000,0,0,$111,0,0,$222,0,0,$333,0,0,$444,0,0,$555,0,0,$666,0,0,$777,0,0
  639.     Dc.w    $888,0,0,$999,0,0,$aaa,0,0,$bbb,0,0,$ccc,0,0,$ddd,0,0,$eee,0,0,$fff,0,0
  640.     Dc.w    $fff,0,0,$eee,0,0,$ddd,0,0,$ccc,0,0,$bbb,0,0,$aaa,0,0,$999,0,0,$888,0,0
  641.     Dc.w    $777,0,0,$666,0,0,$555,0,0,$444,0,0,$333,0,0,$222,0,0,$111,0,0,$000,0,0
  642.     Dc.w    -1
  643.  
  644. CycleList7    Dc.w    0,$fff
  645.     Dc.w    -1
  646.  
  647.     ;Dc.w    $,$,$,$,$,$,$,$
  648.     ;Dc.w    $,$,$,$,$,$,$,$
  649.     ;Dc.w    $,$,$,$,$,$,$,$
  650.     ;Dc.w    $,$,$,$,$,$,$,$
  651.     ;Dc.w    $,$,$,$,$,$,$,$
  652.     ;Dc.w    $,$,$,$,$,$,$,$
  653.  
  654. CycleList8    Dc.w    0,0,0,$fff,-1
  655. CycleList9    Dc.w    $f00,$0f0,$00f,-1
  656. CycleList10    Dc.w    $f00,0,0,$0f0,0,0,$00f,0,0,-1
  657. CycleList11    Incbin    SysData/Cl1
  658. CycleList12    Incbin    SysData/Cl2
  659. CycleList13    Incbin    SysData/Cl3
  660. CycleList14    Incbin    SysData/Cl4
  661. CycleList15    Incbin    SysData/Cl5
  662. CycleList16    Incbin    SysData/Cl6
  663.  
  664. Cmv    Macro
  665.     Dc.w    \2,\1
  666.     EndM
  667.     
  668. Cwt    Macro
  669.     Dc.w    (\1*$100)+$01,$fffe
  670.     EndM    
  671.  
  672. Pal    Macro
  673.     Dc.w    $ffe1,$fffe
  674.     EndM    
  675.  
  676. EndCop    Macro
  677.     Dc.w    $ffff,$fffe
  678.     EndM    
  679.  
  680. CopperList    Cwt    $15    
  681.     Cmv    $0200,BplCon0    
  682.     Cmv    $0000,BplCon1    
  683.     Cmv    $000a,BplCon2    
  684.     Cmv    $0028,DdfStrt    
  685.     Cmv    $00d0,DdfStop    
  686.     Cmv    $1671,DiwStrt    
  687.     Cmv    $28e1,DiwStop
  688.     Cmv    $0,BplMod1    
  689.     Cmv    $0,BplMod2    
  690.     
  691.     Cwt    $25        
  692. CopperBPLZ    Cmv    $0,ECSNop
  693.     Cmv    $0,ECSNop
  694. CopperBPLS    Cmv    $f,BplPt0h    
  695.     Cmv    $2300-2,BplPt0l    
  696.     Cmv    $f,BplPt1h    
  697.     Cmv    $232c-2,BplPt1l    
  698.     Cmv    $f,BplPt2h    
  699.     Cmv    $2358-2,BplPt2l    
  700.     Cmv    $f,BplPt3h    
  701.     Cmv    $2384-2,BplPt3l    
  702.     Cmv    $f,BplPt4h
  703.     Cmv    $23b0-2,BplPt4l 
  704.     
  705.     Cwt    $28    
  706.     Cmv    $5200,BplCon0    
  707. CopperCols    Cmv    $0000,Color00
  708.     Cmv    $0f0f,Color01
  709.     Cmv    $0e1e,Color02
  710.     Cmv    $0d2d,Color03
  711.     Cmv    $0c3c,Color04
  712.     Cmv    $0b4b,Color05
  713.     Cmv    $0a5a,Color06
  714.     Cmv    $0969,Color07
  715.     Cmv    $0878,Color08
  716.     Cmv    $0787,Color09
  717.     Cmv    $0696,Color10
  718.     Cmv    $05a5,Color11
  719.     Cmv    $04b4,Color12
  720.     Cmv    $03c3,Color13
  721.     Cmv    $02d4,Color14
  722.     Cmv    $01e5,Color15
  723.     Cmv    $00f6,Color16
  724.     Cmv    $00f7,Color17
  725.     Cmv    $01f8,Color18
  726.     Cmv    $02f9,Color19
  727.     Cmv    $03ea,Color20
  728.     Cmv    $04eb,Color21
  729.     Cmv    $05dc,Color22
  730.     Cmv    $06dd,Color23
  731.     Cmv    $07ce,Color24
  732.     Cmv    $08cf,Color25
  733.     Cmv    $09be,Color26
  734.     Cmv    $0abd,Color27
  735.     Cmv    $0bac,Color28
  736.     Cmv    $0cab,Color29
  737.     Cmv    $0d9a,Color30
  738.     Cmv    $0e99,Color31
  739.     
  740.     Pal
  741.     Cwt    $28
  742.     Cmv    $0200,BplCon0    
  743.                     
  744.     EndCop
  745.     
  746. PiccyLoad    Incbin    CodeSegments/PicLoad.Seg
  747. GridSeg    Incbin    CodeSegments/Gridder-Seg
  748. DecrunchIFF    Incbin    CodeSegments/IFFRead-Seg
  749. FileLoad    Incbin    CodeSegments/FileLoad-Seg1
  750. DynaShape    Incbin    CodeSegments/DynaShape-Seg
  751.  
  752. ****Custom Chip Registers****
  753.  
  754. Hardware    = $Dff000
  755.  
  756. ;Control Registers
  757.  
  758. Dmaconr    = $002
  759. Vposr    = $004
  760. Vhposr    = $006
  761. Joy0dat    = $00A
  762. Joy1dat    = $00C
  763. Clxdat    = $00E
  764. Intenar    = $01C
  765. Intereqr    = $01E
  766. Copcon    = $02E
  767.  
  768. ;Blitter Registers
  769.  
  770. Bltcon0    = $040
  771. Bltcon1    = $042
  772. Bltafwm    = $044
  773. Bltalwm    = $046
  774. Bltcpth    = $048
  775. Bltcptl    = $04A
  776. Bltbpth    = $04C
  777. Bltbptl    = $04E
  778. Bltapth    = $050
  779. Bltaptl    = $052
  780. Bltdpth    = $054
  781. Bltdptl    = $056
  782. Bltsize    = $058
  783. Bltcmod    = $060
  784. Bltbmod    = $062
  785. Bltamod    = $064
  786. Bltdmod    = $066
  787. Bltcdat    = $070
  788. Bltbdat    = $072
  789. Bltadat    = $074
  790.  
  791. ;Copper Registers
  792.  
  793. Cop1lc    = $080
  794. Cop1lch    = $080
  795. Cop1lcl    = $082
  796. Cop2lc    = $084
  797. Cop2lch    = $084
  798. Cop2lcl    = $086
  799. Copjmp1    = $088
  800. Copjmp2    = $08A
  801. Diwstrt    = $08E
  802. Diwstop    = $090
  803. Ddfstrt    = $092
  804. Ddfstop    = $094
  805. Dmacon    = $096
  806. Clxcon    = $098
  807. Intena    = $09A
  808. Intreq    = $09C
  809.  
  810. ;BitPlane Registers 
  811.  
  812. BplCon0    = $100
  813. BplCon1    = $102
  814. BplCon2    = $104
  815. BplMod1    = $108
  816. BplMod2    = $10a
  817.  
  818. BplPt0h    = $0e0
  819. BplPt0l    = $0e2
  820. BplPt1h    = $0e4
  821. BplPt1l    = $0e6
  822. BplPt2h    = $0e8
  823. BplPt2l    = $0ea
  824. BplPt3h    = $0ec
  825. BplPt3l    = $0ee
  826. BplPt4h    = $0f0
  827. BplPt4l    = $0f2
  828. BplPt5h    = $0f4
  829. BplPt5l    = $0f6
  830.  
  831. ;Colour Registers
  832.  
  833. Color00    = $180
  834. Color01    = $182
  835. Color02    = $184
  836. Color03    = $186
  837. Color04    = $188
  838. Color05    = $18a
  839. Color06    = $18c
  840. Color07    = $18e
  841. Color08    = $190
  842. Color09    = $192
  843. Color10    = $194
  844. Color11    = $196
  845. Color12    = $198
  846. Color13     = $19a
  847. Color14     = $19c
  848. Color15     = $19e
  849. Color16     = $1a0
  850. Color17     = $1a2
  851. Color18     = $1a4
  852. Color19     = $1a6
  853. Color20     = $1a8
  854. Color21     = $1aa
  855. Color22     = $1ac
  856. Color23     = $1ae
  857. Color24     = $1b0
  858. Color25     = $1b2
  859. Color26     = $1b4
  860. Color27     = $1b6
  861. Color28     = $1b8
  862. Color29     = $1ba
  863. Color30     = $1bc
  864. Color31     = $1be
  865.  
  866. EcsNop    = $1fe
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883. RVS2
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.